package com.tmt.im.manager.config.beans;

import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.web.session.InvalidSessionStrategy;

import java.io.IOException;

/**
 * @Description TODO
 * @Author wuyi
 * @Date 2024/7/26 23:26
 * @Version 1.0
 **/
@Slf4j
public class MyInvalidSessionStrategy implements InvalidSessionStrategy {

    @Override
    public void onInvalidSessionDetected(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
        //检查到无效Session后转入登录界面。
        log.info("-----检查到无效Session-----");
    }

}
